<template>
  <div class="tabbar">
    <van-tabbar v-model="tagActive" fixed placeholder>
      <van-tabbar-item name="home" replace to="/" icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item name="leisureclass" icon="todo-list-o" replace to="/leisureclass/1">预约</van-tabbar-item>
      <van-tabbar-item name="stadium" icon="shop-o" replace to="/stadium">场馆</van-tabbar-item>
      <van-tabbar-item name="my" replace to="/my" icon="user-o">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'Tabbar',
  props: {
    active: String
  },
  watch: {
    active() {
      if (this.active === this.$route.path.split('/').pop()) {
      }
    }
  },
  data() {
    return {
      tagActive: this.active
    }
  }
}
</script>

<style scoped>
</style>
